import request from '@/utils/request'

// 查询货位管理列表
export function listLocation(query) {
  return request({
    url: '/location/location/list',
    method: 'get',
    params: query
  })
}

// 查询货位管理列表
export function listLocationByPid(query) {
  return request({
    url: '/location/location/selectByPid',
    method: 'get',
    params: query
  })
}

// 查询货位管理详细
export function getLocation(id) {
  return request({
    url: '/location/location/' + id,
    method: 'get'
  })
}

// 新增货位管理
export function addLocation(data) {
  return request({
    url: '/location/location',
    method: 'post',
    data: data
  })
}
// 新增货位管理
export function addAllLocation(data) {
  return request({
    url: '/location/location/addAll',
    method: 'post',
    data: data
  })
}

// 修改货位管理
export function updateLocation(data) {
  return request({
    url: '/location/location',
    method: 'put',
    data: data
  })
}

// 删除货位管理
export function delLocation(id) {
  return request({
    url: '/location/location/' + id,
    method: 'delete'
  })
}
